/*

Sample Network Send Source

Author: teknecal
Created: 7/07/2008

Using some source from ftpii v0.0.5
ftpii Source Code Copyright (C) 2008 Joseph Jordan <joe.ftpii@psychlaw.com.au>

*/
#ifndef _COMMON_H_
#define _COMMON_H_

#ifdef __cplusplus
extern "C"
{
#endif //__cplusplus

#include <ogcsys.h>
#include <jpeg/jpgogc.h>

#include <stdio.h>

u8 initialise_reset_button();

void die(char *msg);

void initialise();

void wait_for_network_initialisation();

s32 write_exact(s32 s, char *buf, s32 length);

u32 split(char *s, char sep, u32 maxsplit, char *result[]);

extern s32 connect_to_server(char* ip);
extern s32 send_message(s32 server, char* http_dir,char* http_host);
extern s32 get_file(s32 server, FILE *f);
extern char* get_location(char* filename, char* wiiload_dir);
extern void instructions_update();
extern void check_dir(char* path);
extern void load_network();

#ifdef __cplusplus
}
#endif //__cplusplus

#endif /* _COMMON_H_ */
